<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html>
    
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel="canonical" href="70159.html" />
        <title>
        </title>
        <link href="../favicon.png" rel="apple-touch-icon-precomposed" />
        <meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1,user-scalable=no">
        {css href="stylesheet" href="/static/app/css/style.css"}
        {css href="/static/css/toastr.min.css"}
        {css href="/static/layout/css/style.css" }
        {css href="/static/css/details.css"}
        <style>
           #collect{background-color:#EEEEEE;width:40px;height:20px;border:none;line-height:20px;text-align:center;margin-top:5px;color:#EB6100;}
           body{background-color:#EEEEEE;}
           .mod{width:118.5px;height:36px;background-color:#eeeeee;line-height:18px;text-align:center;font-size:1em;border:none;color:#65CEA7;}
            .dir{display: none;}
            h1{margin-top:0px;}
        </style>
    </head>
    
    <body>
        <div class="header">
            <span class="nav_left">
                <a href="javascript:history.go(-1)">
                    返回
                </a>
            </span>
            <span class="nav_right">
                <a rel="internal" href="../nspd@cnl=kanshu">
                    
                </a>
                </h1>
            </span>
            <h1>
                作品简介
            </h1>
        </div>
        <div class="wrap clearfix">
            <div class="section bindex">
                <div class="btitle">
                    {$data.name}
                    <span>
                        (完本)
                    </span>
                </div>
                <div class="blist">
                    <ul>
                        <li>
                            <div class="bookwrap clearfix">
                                <div class="bcover fl">
                                    <img src="{$data.face}"
                                    height="110" width="75">
                                </div>
                                <div class="bintro b_i pl10">
                                    <p>
                                        分类:
                                        <b class="tname">
                                            <a href="" class="ye">
                                                {$one.name}＞{$two.name}
                                            </a>
                                        </b>
                                        <br/>
                                        作者: {$data.author}
                                        <br/>
                                        {$data.hot}人在读
                                        <br/>
                                        价格: ￥{$data.price}
                                        <br/>
                                        <button id="collect" data-id="{$data.id}" style="left:86px;top:80px;">收藏</button>
                                    </p>
                                </div>
                            </div>
                            <div class="blink gyb bl3 mt5">
                                <a href="{:url('mobile/details/readbook',['id'=>$data.id])}" class="cur">
                                    马上阅读
                                </a>
                                {if ( empty($Think.session.user) && empty($Think.cookie.loginid) )}                 
                                  <button type="button" class="btn btn-primary detaildesc1 mod" data-toggle="modal" data-target=".bs-example-modal-sm">{$info.desc}</button>
                                {else/}
                                <button type="button" class="btn btn-primary detaildesc mod" data-toggle="modal" data-target=".bs-example-modal-sm">{$info.desc}</button>
                                {/if}
                                <button class="mod buycar" data-id="{$data.id}">加入购物车</button>
                            </div>
                        </li>
         <!-- Modal -->
        <div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true" style="left:6px;">
        <div class="modal-dialog modal-sm" style="margin-right:415px;">
            <div class="modal-content"style="width:400px;">
              <div class="modal-header" style="background-color:#FAFAF7;">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel" style="color:#333">购买图书</h4>
                <h5 class="modal-title" id="myModalLabel" style="float:right;color:#333;margin-top:-25px;margin-right:20px;">账号：<span style="color:#58bd5a;display:inline-block;">{$Request.session.user.name}</span></h5>

              </div>
              <div class="modal-body">
                <div class="buyinfo">
                    <span>购买图书:</span>
                    <div class="bookdata" style="margin-left:0px;width:355px;">
                        <img src="{$data.face}">
                        <span style="margin-top:7px;display:inline-block;">{$data.name}</span>
                        <span class="howmany">共一本</span>
                    </div>
                </div>
                <div class="countnumber" style="margin-top:40px;">图书总额：<span style="color:#333;display:inline-block;">{$data.price}元</span></div>
                <div class="countnumber">应付金额：<span style="font-size:20px;color:#f60;display:inline-block;">{$data.price}</span>元</div>
              </div>
              <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button class="btn btn-primary pay" data-id="{$data.id}">立即支付</button>
              </div>
            </div>
          </div>
        </div>
     <!-- Modal -->
                        <li>
                            <span class="bname">
                                <a href="../content/70159-3173220.html@cnl=kanshu">
                                    最新章节：
                                    <b class="ye">
                                        第299章 生死一刻
                                    </b>
                                </a>
                            </span>
                            更新时间：
                            <b class="gy">
                                (2018-06-15 14:06更新)
                            </b>
                        </li>
                        <li>
                            <div class="intro">
                                <p>
                                    <b>
                                        标签：{$data.tag}
                                    </b>
                                </p>
                            </div>
                        </li>
                    </ul>
                </div>

            </div>
            <div class="section">
                <div class="tab-menu t2">
                    <a href="##" class="cur" id="cmtbtn">
                        评论
                    </a>
                    <a href="##" id="dirbtn">
                        目录
                    </a>
                </div>
                <div class="tab-pane">
                    <ul class="clist tab-content active">
                        {if !empty($comment)}
                        {volist name="comment" id="v"}
                        <li>
                            <div class="user">
                                <span class="tname">
                                    <img src="{$v.icon}" style="width: 20px; height: 20px; float: left; margin-right: 5px">
                                    <span>{$v.name}</span>
                                </span>
                                <span class="binfo">{$v.ctime}</span>
                            </div>
                            <div class="msg">{$v.content}</div>
                        </li>
                        {/volist}
                        {else/}<li><div class="msg" style="text-align: center;">暂无评论</div></li>
                        {/if}
                    </ul>
                    <ul class="clist tab-content dir">
                        <li class="cff76">以下为免费章节</li>
                         {foreach name="dir" item="v" offset="0" length="3" key="k"}
                            <li>
                                <a href="{:url('mobile/Details/readbook',['id'=>$data.id])}/?page={$k+1}">
                                   {$v['name']}</a></span>
                            </li>
                        {/foreach}
                        <li><a href="{:url('mobile/Details/showdir',['id'=>$data.id])}" class="cff76">查看更多＞</a></li>
                    </ul>
                </div>
            </div>
            <div class="section">
                <h3 class="title">
                    <span class="b_l">
                        你可能会喜欢
                    </span>
                </h3>
                <div class="blist">
                    <ul>
                        {volist name="likedata" id="v"}
                        <li>
                            <a href=''>
                                <div class="bcover fl">
                                    <img src="{$v.face}" height="130" width="85" />
                                </div>
                                <div class="bintro pl10">
                                    <h4>
                                        {$v.name}
                                    </h4>
                                    <p>
                                        {$v.author}
                                        <br>
                                        {$v.price} &nbsp;{$v.hot}人在读
                                    </p>
                                </div>
                            </a>
                        </li>
                        {/volist}
                    </ul>
                </div>
            </div>
            <div class="search">
                <div class="searchbox mt10 clearfix">
                    <form action="/3g/search?cnl=kanshu" method="get">
                        <input name="kw" type="text" class="t_i" placeholder="搜书搜作者" autocomplete="off"
                        value="" />
                        <input type="hidden" name="search" value="aname" />
                        <div class="searchbtn">
                            <span class="t_b">
                            </span>
                            <span class="t_t">
                                搜索
                            </span>
                            <input type="submit" value="" />
                        </div>
                    </form>
                </div>
            </div>
            <div class="footer home-bg">
                <div class="footer_nav clearfix">
                    <a href="../index@cnl=kanshu">
                        首页
                    </a>
                    <a href="../bookshelf@cnl=kanshu">
                        书架
                    </a>
                    <a href="../classifi@cnl=kanshu">
                        分类
                    </a>
                    <a href="../feedback@cnl=kanshu">
                        留言
                    </a>
                    <a href="../usercenter@cnl=kanshu">
                        个人中心
                    </a>
                </div>
                <p class="edition mt20">
                    <span>
                        <a href="../20/novelinfo/70159.html@cnl=kanshu">
                            普通版
                        </a>
                        |
                        <a href="##" class="select">
                            触屏版
                        </a>
                    </span>
                </p>
                <p class="copyright mt20">
                    <b>
                        看书网
                    </b>
                    wap.kanshu.com
                </p>
                <span id="gotop" class="icons icon-gotop">
                </span>
            </div>
            <div class="pop_cover">
            </div>
            <div class="pop_tip">
                <div class="pop_inner">
                    <div class="pop_cont">
                    </div>
                </div>
            </div>
    </body>

    {js href="/static/layout/js/jquery-1.10.2.min.js" }
    {js href="/static/js/toastr.min.js"}
    {js href="/static/layout/js/bootstrap.min.js" }
    <script type="text/javascript">
        // 目录与评论切换
        var mark = true;
         $('#dirbtn').click(function () {
            Doclick();
            mark = !mark;
        });
          $('#cmtbtn').click(function () {
            Doclick();
            mark = !mark;
        });

          function Doclick() {
            if (mark) {
                $('.dir').css({display:"block"});
                $('.dir').prev('ul').css({display:"none"});
                $('#dirbtn').css({color: "#e98100", backgroundColor: "#ffffff"});
                $('#cmtbtn').css({color: "#000000", backgroundColor: "#eeeeee"});
            }else{
                $('.dir').css({display:"none"});
                $('.dir').prev('ul').css({display:"block"});
                $('#dirbtn').css({color: "#000000", backgroundColor: "#eeeeee"});
                $('#cmtbtn').css({color: "#e98100", backgroundColor: "#ffffff"});
            }
          }
          
         $('#dirbtn').click(function () {
            $('.dir').prev('ul').css({display:"none"});
        });
          $('#cmtbtn').click(function () {
            $('.dir').prev('ul').css({display:"block"});
        });

        $(function () {
        // 设置弹框参数
        toastr.options = {
            closeButton: true,// 是否显示关闭按钮
            progressBar: true,// 实现显示计时条
            timeOut: "3000",  // 自动关闭时间
            positionClass: "toast-top-right" // 提示位置
            // toast-top-full-width 顶端，宽度铺满整个屏幕
            // toast-top-right  顶端右边
        };

        // 触发添加收藏小说
        $('#collect').click(function () {
            var cid = $(this).attr('data-id');
            AddCollect(cid); // 指定添加信息操作
        });

        //触发添加购物车
        $('.buycar').click(function(){
            var bid = $(this).attr('data-id');
            AddBuyCar(bid); // 指定添加信息操作
        });

        //点击购买
        $('.pay').click(function(){
            var pid = $(this).attr('data-id');
            pay(pid);
        });

        $('.detaildesc').click(function(){
            if($(this).html() == '已购买'){
                $(this).removeAttr('data-toggle');
                toastr.error('亲~你已经购买过啦', 'FBI WARING:');
            }
        });

        $('.detaildesc1').click(function(){
            toastr.error('亲~请先登录~再购买哦', 'FBI WARING:');
        });
    });


    function AddCollect(cid) {
        $.ajax({
            type: 'get',
            url: '/mobilecollect/'+cid,
            dataType:'json',
            success: function (data) {
                if (data.status) {
                    toastr.success(data.info);
                } else {
                    toastr.error(data.info, 'FBI WARING:');
                }
            },
            error: function () {
                toastr.error('亲~请先登录~再收藏哦', 'FBI WARING:');
            }
        });
    }


    function AddBuyCar(bid) {
        $.ajax({
            type: 'get',
            url: '/mobilebuy/'+bid,
            dataType:'json',
            success: function (data) {
                if (data.status) {
                    toastr.success(data.info);
                } else {
                    toastr.error(data.info, 'FBI WARING:');
                }
            },
            error: function () {
                toastr.error('亲~请先登录~再加入购物车哦', 'FBI WARING:');
            }
        });
    }


    function pay(pid) {
        $.ajax({
            type: 'get',
            url: '/mobilepay/'+pid,
            dataType:'json',
            success: function (data) {
                if (data.status) {
                    toastr.success(data.info);
                    window.location.reload();
                } else {
                    toastr.error(data.info, 'FBI WARING:');
                }
            },
            error: function () {
                alert('AJAX操作失败');
            }
        });
    }

    </script>
    </body>
</html>